<template>
  <div class="bread-wrap">
    <el-breadcrumb :separator-icon="ArrowRight">
     <el-breadcrumb-item v-for="(item, index) in breadList" :key="index">
        <span v-if="index == breadList.length - 1">{{ item.meta.title }}</span>
        <span v-else :to="item.path">{{ item.meta.title }}</span>
      </el-breadcrumb-item>
    </el-breadcrumb>
  </div>
</template>
<script setup>
import {ArrowRight} from "@element-plus/icons-vue";
import { useRoute } from "vue-router";
import { computed } from "vue";
const route = useRoute();
const breadList = computed(() => {
  return route.matched;
});
</script>
<style>
.bread-wrap {
  padding: 10px 0;
}
</style>